package com.gxwgy.wg2404.bank.service;


import com.gxwgy.wg2404.bank.dao.AccountDao;
import com.gxwgy.wg2404.bank.exceptions.MoneyNoEnoughException;
import com.gxwgy.wg2404.bank.pojo.Account;
import com.gxwgy.wg2404.bank.utils.DBUtil;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * @author 姚相国
 * @version 1.0
 * @className AccountService
 * @date 2024/10/13 16:58
 * Service被翻译为: 业务
 * AccountService中专门除了Account业务的一个类
 * 在此类中应该只编写纯业务代码
 */
public interface AccountService {

    /**
     * 完成转账的业务逻辑
     * @param fromAccount 转出账号
     * @param toAccount 转入账号
     * @param money 转账金额
     */
    void transfer(String fromAccount,String toAccount,double money) throws MoneyNoEnoughException;
}
